"""
@Author : 合肥一元数智教育科技有限公司
@Date :  2025/3/21 14:57
@Description :   测试数据工具类的使用

"""
from pymysql_08 import db_helper
"""
conn, cur = db_helper.get_connection_cursor()
rows = cur.execute('select * from user')
rows_data = cur.fetchall()
for row in rows_data:
    print(row)
"""
# str_sql = 'insert into user (username,password) values (%(username)s,%(password)s)'
# line = db_helper.execute(str_sql, username='xiaoming', password='111111')
# print(line)


str_sql = 'select * from user where id = %(id)s'
rows_data = db_helper.fetchall(str_sql,id=5)
for row in rows_data:
    print(row)


